var ObserverMgr = require("ObserverMgr");

cc.Class({
    extends: cc.Component,

    properties: {
        titleLabel: {default: null, displayName: "金币", type: cc.Label},
        moneyLabel: {default: null, displayName: "money", type: cc.Label},
    },

    onLoad: function () {

    },
    onClickBuyBtn(){
        console.log("onClickBuyBtn");
        ObserverMgr.dispatchMsg(GameLocalMsg.Center.OnClickBuy, null);
    },
    setData(data){
        var gold = data['gold'];
        this.titleLabel.string = gold.toString()+"金币";

        var money = data['money'];
        this.moneyLabel.string = money.toString()+"元";
    },
});
